const { get, post } = require('./sgl_http')

// 发布动态
export const postTopic = (params) => {
    return post('/topic/post', params, true)
}

// 动态详情
export const getTopicDetail = (params) => {
    return get('/topic/detail', params)
}

// 获取全部动态列表
export const getTotalTopicList = (params) => {
    return get('/topic/list', params)
}

// 获取点赞动态列表
export const getPraiseTopicList = (params) => {
    return get('/topic/list/praise', params)
}

// 获取转发动态列表
export const getRePostTopicList = (params) => {
    return get('/topic/list/re-post', params)
}

// 获取原创动态列表
export const getOriginalTopicList = (params) => {
    return get('/topic/list/original', params)
}

// 删除动态
export const deleteTopic = (params) => {
    return post('/topic/delete', params, true)
}

// 发布评论
export const postComment = (params) => {
    return post('/topic/comment/post', params, true)
}

// 获取评论列表
export const getCommentList = (params) => {
    return get('/topic/comment/list', params)
}

// 删除评论
export const deleteComment = (params) => {
    return post('/topic/comment/delete', params, true)
}

// 点赞
export const addPraise = (params) => {
    return post('/topic/praise/add', params, true)
}

// 取消点赞
export const cancelPraise = (params) => {
    return post('/topic/praise/cancel', params, true)
}